
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/21 0021
 * Time: 下午 8:02
 */

defined('BASEPATH') OR exit('No direct script access allowed');

class Company extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->database();
        $this->load->helper('url');
    }

    public function myCompany()
    {
        $data['title']='公司介绍';
        //渲染页面
        $this->load->view('home/header',$data);   //公共的头部
        $this->load->view('home/about',$data);  //主体内容
        $this->load->view('home/footer',$data);  //尾部

    }

    public function companyBrand()
    {
        $data['title']='公司品牌';
        //渲染页面
        // 查询五个楼盘分类
        $this->db->select('type.*,house.*');
        $this->db->from('type');
        $this->db->join('house', 'house.house_type = type.type_id');
        $data['type']= $this->db->limit(6)->get()->result_array();

        $top = ['artwork','creative','nature','outside','photography','mac'];

        foreach($data['type'] as $k=>$v)
        {
            $data['type'][$k]['top'] = $top[$k];
           // echo $v['top']=$top;
        }
         //print_r($data['type']);

        $this->load->view('home/header',$data);   //公共的头部
        $this->load->view('home/brand',$data);  //主体内容
        $this->load->view('home/footer',$data);  //尾部
    }

    public function contact()
    {
        $data['title']='联系我们';
        //渲染页面
        $this->load->view('home/header',$data);   //公共的头部
        $this->load->view('home/contact',$data);  //主体内容
        $this->load->view('home/footer',$data);  //尾部

    }










}